package com.mazaiting.manager.api.fallback;

import com.mazaiting.common.core.domain.result.Result;
import com.mazaiting.common.core.domain.result.ResultCode;
import com.mazaiting.manager.api.IOAuth2ClientFeignClient;
import com.mazaiting.manager.dto.SysOauthClientDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 认证客户端降级
 *
 * @author mazaiting
 * @create_time 2022/9/19 00:21
 */
@Slf4j
@Component
public class OAuth2ClientFeignFallbackClient implements IOAuth2ClientFeignClient {
    @Override
    public Result<SysOauthClientDTO> getOAuth2ClientById(String clientId) {
        log.error("feign远程调用认证客户服务异常后的降级方法");
        return Result.failed(ResultCode.FEIGN_DEGRADATION);
    }
}
